-- GENERATED SPELL FOR [Barley] --


function spell0_16587(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(22121,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16587', 683, 1)
end

function Sorts_16587(pUnit, Event)
local choix_sorts_16587 = math.random(0, 0)
if choix_sorts_16587 == 0 then
pUnit:RegisterEvent('spell0_16587', 1, 1)
end
end

function mob16587_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16587', math.random(1500, 3000), 1)
end

function mob16587_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16587_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16587_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16587, 1, 'mob16587_Action')
RegisterUnitEvent(16587, 2, 'mob16587_Leave')
RegisterUnitEvent(16587, 3, 'mob16587_Kill')
RegisterUnitEvent(16587, 4, 'mob16587_Die')
